<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> 
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<script>
$(document).ready(function(){
	var DATA;
	var url="http://localhost:8080/webapp/show1";
	$.get(url,function(data){
		
	})
	
});
var app = angular.module('duo', ["ui.router"]);
//路由，后台jsp动态生成
app.config(function($stateProvider){
	 <%
	 String[]ar=(String[])session.getAttribute("gg");
	 if(ar!=null){
	 for(int i=0; i <ar.length;i++){%> 
		 
$stateProvider
.state('<%=ar[i]%>',{
 url: '/<%=ar[i]%>',
 templateUrl: 'http://localhost:8080/webapp/<%=ar[i]%>'
})
.state('<%=ar[i]%>', {
 url: '/<%=ar[i]%>',
 templateUrl: 'product.html'
})
.state('<%=ar[i]%>', {
 url: '/<%=ar[i]%>',
 templateUrl: 'http://localhost:8080/webapp/<%=ar[i]%>'
});
})
<%}%>
<%}%>

<%--  <%
String[]ar=(String[])request.getAttribute("gg");
for(int i=0; i <ar.length;i++){%> 
      hhha+<%=ar[i]%>; 
<%}%> 
%> --%>
</script>

</body>
</html>